package org.patchca.filter.predefined;

import java.awt.image.BufferedImageOp;
import java.util.ArrayList;
import java.util.List;
import org.patchca.filter.AbstractFilterFactory;
import org.patchca.filter.library.RippleImageOp;

public class RippleFilterFactory extends AbstractFilterFactory
{
    protected List<BufferedImageOp> filters;
    protected RippleImageOp ripple;

    public RippleFilterFactory()
    {
        this.ripple = new RippleImageOp();
    }

    protected List<BufferedImageOp> getPreRippleFilters()
    {
        return new ArrayList<BufferedImageOp>();
    }

    protected List<BufferedImageOp> getPostRippleFilters()
    {
        return new ArrayList<BufferedImageOp>();
    }

    public List<BufferedImageOp> getFilters()
    {
        if (this.filters == null)
        {
            this.filters = new ArrayList<BufferedImageOp>();
            this.filters.addAll(getPreRippleFilters());
            this.filters.add(this.ripple);
            this.filters.addAll(getPostRippleFilters());
        }
        return this.filters;
    }
}
